package exam.huawei;

import java.util.HashMap;
import java.util.Scanner;

/**
 * @author chenhong
 * @version 1.0
 * @description TODO
 * @date 2023/4/14 20:30
 */
public class HJ29 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String from = in.next();
        String to = in.next();
        HashMap<Character, Character> encrypt_map = new HashMap<>();
        HashMap<Character, Character> decrypt_map = new HashMap<>();
        for (char ch = 'a'; ch <= 'z'; ch++) {
            char value = (char) ('a' + (ch - 'a' + 1) % 26);

            encrypt_map.put(ch, Character.toUpperCase(value));
        }
        for (char ch = 'A'; ch <= 'Z'; ch++) {
            char value = (char) ('A' + (ch - 'A' + 1) % 26);
            encrypt_map.put(ch, Character.toLowerCase(value));
        }
        for (char ch = '0'; ch <= '9'; ch++) {
            char value = (char) ('0' + (ch - '0' + 1) % 10);
            encrypt_map.put(ch, value);
        }
        for (Character key : encrypt_map.keySet()) {
            decrypt_map.put(encrypt_map.get(key), key);
        }
        encryption(from, encrypt_map);
        decryption(to, decrypt_map);
    }

    private static void encryption(String str, HashMap<Character, Character> encrypt_map) {
        for (int i = 0; i < str.length(); i++) {
            System.out.print(encrypt_map.get(str.charAt(i)));
        }
        System.out.println();
    }

    private static void decryption(String str, HashMap<Character, Character> decrypt_map) {
        for (int i = 0; i < str.length(); i++) {
            System.out.print(decrypt_map.get(str.charAt(i)));
        }
        System.out.println();
    }
}
